﻿/*#region Nestable List*/
.dd {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    max-width: 600px;
    list-style: none;
    line-height: 20px;

    &.shadowed {
        .dd-handle, .dd2-content {
            .box-shadow(0 0 4px rgba(0, 0, 0, 0.3));
        }
    }

    &.bordered {
        .dd-handle, .dd2-content {
            border: 1px solid #cfcfcf;
        }
    }

    &.darker {
        .dd-handle, .dd2-content {
            background-color: @ivory;
        }

        .dd2-handle, .dd-dragel > li > .dd2-handle {
            background-color: @platinum;
        }
    }
}

.dd-list {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;

    > li {
        > .dd-handle, > .dd2-content {
            /*#region colered List Item*/
            &[class*="bg-"] {
                color: #FFF;
            }
        }
    }
}

    .dd-list .dd-list {
        padding-left: 30px;
    }

.dd-collapsed .dd-list {
    display: none;
}

.dd-item, .dd-empty, .dd-placeholder {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 20px;
    line-height: 20px;
}

.dd-handle, .dd2-content {
    display: block;
    min-height: 38px;
    margin: 5px 0;
    padding: 8px 12px;
    background: @whitesmoke;
    color: @sonic-silver;
    font-size: 13px;
    text-decoration: none;
    .box-sizing(border-box);

    &:hover, &:hover {
        color: @darkcarbon;
        background: @ivory;
    }

    &[class*="btn-"] {
        color: #FFF;
        border: 0;
        padding: 9px 12px;

        &:hover {
            opacity: .85;
            color: #FFF;
        }
    }
}

.dd2-handle + .dd2-content, .dd2-handle + .dd2-content[class*="btn-"] {
    padding-left: 44px;
}

.dd-handle[class*="btn-"]:hover, .dd2-content[class*="btn-"] .dd2-handle[class*="btn-"]:hover + .dd2-content[class*="btn-"] {
    color: #FFF;
}

.dd-item > button:hover ~ .dd-handle[class*="btn-"], .dd-item > button:hover ~ .dd2-content[class*="btn-"] {
    opacity: .85;
    color: #FFF;
}

.dd2-handle:hover ~ .dd2-content {
    color: @darkcarbon;
    background: @whitesmoke;
}

.dd2-item.dd-item > button {
    margin-left: 38px;
}

.dd-item > button {
    display: block;
    position: relative;
    z-index: 1;
    cursor: pointer;
    float: left;
    width: 25px;
    height: 20px;
    margin: 5px 1px 5px 5px;
    padding: 0;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    font-weight: bold;
    top: 4px;
    left: 1px;
    color: @sonic-silver;

    &:before {
        font-family: FontAwesome;
        content: '\f067';
        display: block;
        position: absolute;
        width: 100%;
        text-align: center;
        text-indent: 0;
        font-weight: normal;
        font-size: 14px;
    }

    &[data-action="collapse"]:before {
        content: '\f068';
    }

    &:hover {
        color: @sonic-silver;
    }
}

.dd-item .dd-colored > button, .dd-item.dd-colored > button:hover {
    color: @whitesmoke;
}

.dd-placeholder, .dd-empty {
    margin: 5px 0;
    padding: 0;
    min-height: 30px;
    background: @whitesmoke;
    border: 1px dashed @lightgray;
    .box-sizing(border-box);
}

.dd-empty {
    border-color: #AAA;
    border-style: solid;
    background-color: @platinum;
}

.dd-dragel {
    position: absolute;
    pointer-events: none;
    z-index: 999;
    .opacity(.8);
}

    .dd-dragel > li > .dd-handle {
        color: @black;
        background: @snow;
        border-left: 2px solid @carbon;
        position: relative;
    }

    .dd-dragel > .dd-item > .dd-handle {
        margin-top: 0;
    }
/*#region Bordered List Item*/
.dd-list > li[class*="bordered-"] {
    border-width: 0;
    padding: 0;
}

    .dd-list > li[class*="bordered-"] > .dd-handle {
        border-left: 2px solid;
        border-left-color: inherit;
    }

.dd-list > li.bordered-blue > .dd-handle {
    border-left-color: @blue;
}

.dd-list > li.bordered-primary > .dd-handle {
    border-left-color: @primary;
}

.dd-list > li.bordered-danger > .dd-handle {
    border-left-color: @danger;
}

.dd-list > li.bordered-warning > .dd-handle {
    border-left-color: @warning;
}

.dd-list > li.bordered-success > .dd-handle {
    border-left-color: @success;
}

.dd-list > li.bordered-silver > .dd-handle {
    border-left-color: @silver;
}

.dd-list > li.bordered-inverse > .dd-handle {
    border-left-color: @carbon;
}

.dd-list > li.bordered-blueberry > .dd-handle {
    border-left-color: @blueberry;
}

.dd-list > li.bordered-palegreen > .dd-handle {
    border-left-color: @palegreen;
}

.dd-list > li.bordered-orange > .dd-handle {
    border-left-color: @orange;
}

.dd-list > li.bordered-darkorange > .dd-handle {
    border-left-color: @darkorange;
}

.dd-list > li.bordered-magenta > .dd-handle {
    border-left-color: @magenta;
}

.dd-list > li.bordered-purple > .dd-handle {
    border-left-color: @purple;
}

.dd-list > li.bordered-maroon > .dd-handle {
    border-left-color: @maroon;
}
/*#endregion Bordered List Item*/
.dd-list > li > .dd-handle .sticker {
    position: absolute;
    right: 0;
    top: 0;
}

.dd2-handle, .dd-dragel > li > .dd2-handle {
    left: 0;
    top: 0;
    width: 38px;
    margin: 0;
    border-width: 1px 1px 0 0;
    text-align: center;
    padding: 0 !important;
    line-height: 38px;
    height: 38px;
    background: @white;
    cursor: pointer;
    overflow: hidden;
    position: absolute;
    z-index: 1;

    .normal-icon, .drag-icon {
        font-size: 16px;
    }
}

    .dd2-handle:hover, .dd-dragel > li > .dd2-handle {
        background: @seashell;
    }

.dd-item > .dd2-handle .drag-icon {
    display: none;
}

.dd-dragel > .dd-item > .dd2-handle .drag-icon {
    display: inline;
}

.dd-dragel > .dd-item > .dd2-handle .normal-icon {
    display: none;
}
/*#endregion Nestable List*/